﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DLINQ(LINQ to SQL)之执行SQL语句的添加、查询、更新和删除.aspx.cs" Inherits="_35newpart_Linq_DLINQ_LINQ_to_SQL_之执行SQL语句的添加_查询_更新和删除" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>DLINQ(LINQ to SQL)之执行SQL语句的添加、查询、更新和删除 Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>        <p>
                    <asp:ScriptManager ID="ScriptManager2" runat="server">
                    </asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>

                </ContentTemplate>
            </asp:UpdatePanel>
                    分类名称：<asp:TextBox ID="txtCategoryName" runat="server"></asp:TextBox>
                    &nbsp;&nbsp; 分类描述：<asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>
                    &nbsp;&nbsp;
                    <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="添加" />
                    <p>
                        更新数据 
                    </p>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="80%">
                    <fields>
                        <asp:commandfield ShowEditButton="True"></asp:commandfield>
                    </fields>
                </asp:DetailsView>
                <asp:GridView ID="gvCategory" runat="server" DataKeyNames="bookid" 
                    onrowcancelingedit="gvCategory_RowCancelingEdit" 
                    onrowdeleting="gvCategory_RowDeleting" onrowediting="gvCategory_RowEditing" 
                    onrowupdating="gvCategory_RowUpdating" 
                    onselectedindexchanged="gvCategory_SelectedIndexChanged" PageSize="3">
                    <columns>
                        <asp:commandfield ShowDeleteButton="true" ShowEditButton="true" 
                            ShowSelectButton="true" />
                    </columns>
                </asp:GridView>
            </ContentTemplate>
            </asp:UpdatePanel>
    </p>

    
    <br />

        <p>              &nbsp;</p>
    
    </div>
    </form>
</body>
</html>
